<html lang="en" xmlns:th="http://www.springframework.org/schema/data/jaxb">



<div class="layui-row">
    <form class="layui-form" id="table_form" style="margin: 20px" lay-filter="table_form">
         <input type="hidden"  th:value="${obj.id}" id="id" name="id">
      <!--   <div class="layui-form-item">
             <label class="layui-form-label">表对象描述</label>
             <div class="layui-input-block">
                 <input type="text" name="modifyName" id="modifyName" required  lay-verify="required" placeholder="表对象描述" autocomplete="off" class="layui-input" th:value="${obj.modifyName}">
             </div>
         </div>-->
        <div class="layui-form-item">
            <label class="layui-form-label">表对象中文描述</label>
            <div class="layui-input-block">
                <input type="text" name="remark" id="remark" required  lay-verify="required" placeholder="表对象中文描述" autocomplete="off" class="layui-input" th:value="${obj.remark}">
            </div>
        </div>


        <div class="layui-form-item">
            <label class="layui-form-label">模块注册中心名称（分布式项目必须要填写否则要报错）</label>
            <div class="layui-input-block">
                <input type="text" name="registerName" id="registerName"  placeholder="模块注册中心名称" autocomplete="off" class="layui-input" th:value="${obj.registerName}">
            </div>
        </div>



            <div class="layui-form-item">
                <label class="layui-form-label">生成包名</label>
                <div class="layui-input-block">
                        <input type="text" name="packageName" id="packageName" required  lay-verify="required" placeholder=" 例如com.cn.coder 所有的后端代码将会生成在这个模块下" autocomplete="off" class="layui-input" th:value="${obj.packageName}">
                </div>
            </div>

        <div class="layui-form-item">
            <label class="layui-form-label">生成模块名</label>
            <div class="layui-input-block">
                <input type="text" name="modalName" id="modalName"  placeholder=" 例如sys 系统模块 所有的后端代码将会生成 包名+模块名 如 com.cn.coder.sys" autocomplete="off" class="layui-input" th:value="${obj.modalName}">
            </div>
        </div>


        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit="">保存表设置基本信息</button>
                <button class="layui-btn" type="button" onclick="back()">取消</button>
            </div>
        </div>

    </form>
</div>
<script th:inline="javascript" >

    var table_form = layui.form;
    table_form.render(null, 'table_form');
    table_form.on('submit(table_form)',function(){
        var url = /*[[@{/table/update}]]*/
            $.ajax({
                url : url,
                type : "POST",
                async : false,
                dataType : "json",
                data : $("#table_form").serialize(),
                success : function(data) {
                    if(data.code==0){
                        layer.msg(data.msg, {icon: 1});

                    }else{
                        layer.msg(data.msg, {icon: 5});
                    }
                    /* layer.close(1);*/
                    layer.close(update_table_index);
                    tableIns.reload();
                }
            });
        return false;
    })




    function back() {
        layer.close(update_table_index);
    }
</script>
</body>
</html>